package com.leps.nq.op.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.leps.nq.common.vo.PageVo;
import com.leps.nq.op.entity.OpInspection;
import com.leps.nq.op.mapper.OpInspectionMapper;
import com.leps.nq.op.service.IOpInspectionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.leps.nq.op.vo.InspectionQueryModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 巡检日志表 服务实现类
 * </p>
 *
 * @author hex
 * @since 2022-05-22
 */
@Service
public class OpInspectionServiceImpl extends ServiceImpl<OpInspectionMapper, OpInspection> implements IOpInspectionService {
    @Autowired
    OpInspectionMapper inspectionMapper;

    @Override
    public PageVo<OpInspection> pageByQueryModel(InspectionQueryModel model) {
        Page<OpInspection> page = Page.of(model.getPageNum(), model.getPageSize());
        page = this.inspectionMapper.selectByQueryModel(page, model);
        return PageVo.of(page);
    }
}
